Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not trigger preview hooks if enable_previews is false #16099

Merged
merged 2 commits into from
May 6, 2015
Merged

Do not trigger preview hooks if enable_previews is false #16099

merged 2 commits into from
May 6, 2015

Conversation

labkode
Copy link

@labkode labkode commented May 6, 2015

Closes #15784

@ghost
Copy link

ghost commented May 6, 2015

Can one of the admins verify this patch?

@nickvergessen
Copy link
Contributor

@owncloud-bot it's okay to test this

OC_Hook::connect('OC_Filesystem', 'post_delete', 'OC\Preview', 'post_delete_files');
OC_Hook::connect('\OCP\Versions', 'delete', 'OC\Preview', 'post_delete');
OC_Hook::connect('\OCP\Trashbin', 'delete', 'OC\Preview', 'post_delete');
if (\OC::$server->getSystemConfig()->getValue('enable_previews', false)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should wrap the call to this method in line 657 instead of the complete content:

self::registerPreviewHooks();

@nickvergessen nickvergessen added this to the 8.1-current milestone May 6, 2015
@scrutinizer-notifier
Copy link

A new inspection was created.

@labkode
Copy link
Author

labkode commented May 6, 2015

I moved the check to init()

@DeepDiver1975
Copy link
Member

@owncloud-bot this is okay to test

@DeepDiver1975
Copy link
Member

@owncloud-bot retest this please

@ghost
Copy link

ghost commented May 6, 2015

Refer to this link for build results (access rights to CI server needed):
https://ci.owncloud.org//job/pull-request-analyser-ng-simple/12201/
🚀 Test PASSed.🚀
chuck

@DeepDiver1975
Copy link
Member

👍 THX a lot @labkode

@nickvergessen
Copy link
Contributor

@carlaschroder not sure if it is documented, so I just want to check back. We decided to not slow down oc unnecessarily. So we will not clear thumbnails, when an admin changes the setting.
This needs to be done manually (in the data dir, remove all thumbnails folders inside the user directories). This should be acceptable, because changing this setting more then once should not be very common.

@nickvergessen
Copy link
Contributor

👍

nickvergessen added a commit that referenced this pull request May 6, 2015
Do not trigger preview hooks if enable_previews is false
@nickvergessen nickvergessen merged commit 892e2a3 into owncloud:master May 6, 2015
mmattel pushed a commit to mmattel/core that referenced this pull request May 22, 2015
Do not trigger preview hooks if enable_previews is false
@lock lock bot locked as resolved and limited conversation to collaborators Aug 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

enable_previews => false does not cancel preview hooks
4 participants